# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-ukkonen
_pyname=ukkonen
pkgver=1.0.1
pkgrel=3
pkgdesc="Implementation of bounded Levenshtein distance"
url="https://github.com/asottile/ukkonen"
arch="all"
license="MIT"
depends="python3 py3-cffi"
makedepends="python3-dev py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="
	$_pyname-$pkgver.tar.gz::https://github.com/asottile/ukkonen/archive/refs/tags/v$pkgver.tar.gz
	01-fix-musl-build.patch"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
23978b8e22454155e7d8a0d2dbb963f4aa5a6be6cdd75a74e8ec5e06fe32a96b6fc14f0f6d03089726bf761ad6d833dc68ea3fb6cad1ad2ee5b259043072875a  ukkonen-1.0.1.tar.gz
d11f03b3acc8ec06ccafe533c4265688851e3a17fe57b5d969bf9345aee7d6dcd342da9600d0d44421d0a8301242fa82771ea74aec83e402b4447017282bba0b  01-fix-musl-build.patch
"
